<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        .icon1{
            display: block;
            width: 45px;
            height: 70px;
            background-image: url(1.png);
            border: 1px solid red;
            background-position: -21px -8px;
        }
        .icon2{
            display: block;
            width: 45px;
            height: 70px;
            background-image: url(1.png);  /*把多个图片加载到一张图片上*/
            border: 1px solid red;
            background-position: -164px -83px;   /*定位到想要的图片位置*/
        }

    </style>
</head>
<body>

    <span class="icon1"></span>
    <span class="icon2"></span>
    
</body>
</html>